<!DOCTYPE html>
<!-- 引入Thymeleaf -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>饮品列表</title>
</head>
<body>
<a th:href="@{'/drink/to-add'}">添加新饮品</a>
<br/>
<table>
    <thead>
    <tr>
        <th>饮品名</th>
        <th>价格</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="drink: ${drinkList}">
        <td th:text="${drink.name}">柠檬红茶</td>
        <td th:text="${drink.price}">12.00</td>
        <td><a th:href="@{'/drink/'+${drink.id}}">详情</a></td>
    </tr>
    </tbody>
</table>
</body>
</html>